package com.ali.juejin.adapter

import androidx.fragment.app.Fragment

import androidx.viewpager2.adapter.FragmentStateAdapter

class HomeAdapter(fm:Fragment,val fragmentArr:Array<Fragment>): FragmentStateAdapter(fm) {
    override fun getItemCount(): Int {
        return fragmentArr.size
    }

    override fun createFragment(position: Int): Fragment {
        return fragmentArr[position]
    }


}